package com.caigou.modules.famous.ui

import android.os.Bundle
import com.alibaba.android.arouter.facade.annotation.Route
import com.alibaba.android.arouter.launcher.ARouter
import com.caigou.comm.base.constants.AppConstants
import com.caigou.comm.base.constants.RouterPath
import com.caigou.comm.base.container.BaseActivity
import com.caigou.modules.famous.databinding.ActivityFamousWelcomeBinding
import dagger.hilt.android.AndroidEntryPoint

/**
 * @author #Suyghur.
 * Created on 2021/12/08
 */
@Route(path = RouterPath.Famous.PAGE_WELCOME)
@AndroidEntryPoint
class FamousWelcomeActivity : BaseActivity() {

    private lateinit var binding: ActivityFamousWelcomeBinding

    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        binding = ActivityFamousWelcomeBinding.inflate(layoutInflater)
        setContentView(binding.root)
        containerId = binding.famousWelcomeLlContainer.id
        initView()
    }

    private fun initView() {
        binding.famousWelcomeIvReturn.setOnClickListener {
            finish()
        }

        binding.famousWelcomeFlHk.setOnClickListener {
            ARouter.getInstance().build(RouterPath.Famous.PAGE_FAMOUS)
                .withInt(AppConstants.FAMOUS_TYPE, 1)
                .navigation()
            finish()
        }

        binding.famousWelcomeFlMacao.setOnClickListener {
            ARouter.getInstance().build(RouterPath.Famous.PAGE_FAMOUS)
                .withInt(AppConstants.FAMOUS_TYPE, 2)
                .navigation()
            finish()
        }

    }
}